#ifndef PTOPARSER_H_
#define PTOPARSER_H_

#include <string>
#include <deque>

#include <cv.h>

#include "../ErrorCodes.hpp"
#include "../utils/Features.h"



class PTOParser
{
	
public:
	/* These are all the parameters for an image give. in a PTO file.
	 * Although I despise single-character variable names, I leave them
	 * at the names used in the PTO file. */ 
	typedef struct ImageParams{
		int w;
		int h;
		double f;
		double Eb;
		double Eev;
		double Er;
		double Ra;
		double Rb;
		double Rc;
		double Rd;
		double Re;
		double Va;
		double Vb;
		double Vc;
		double Vd;
		double Vx;
		double Vy;
		double a;
		double b;
		double c;
		double d;
		double e;
		double g;
		double p;
		double r;
		double t;
		double v;
		double y;
		double Vm;
		double u;
		std::string name;
	
	} ImageParams;
	
	
public:
	PTOParser();
	virtual ~PTOParser();
	
public:
	errorCodes::errorCode parse(std::string inputFileName);
	
	std::deque<Features::FeaturePair> 	getFeaturePairs();
	std::deque<std::string> 			getFileNames();
	std::deque<std::string> 			getImageLines();
	
	
private:
	std::deque<Features::FeaturePair>	featurePairs;
	std::deque<std::string>				fileNames;
	std::deque<std::string>				imageLines; //for output - just copy
};

#endif /*PTOPARSER_H_*/
